#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
typedef long long LL;
int main()
{
	for (int i = 1; i <= 100; i++) {
		int x = i * i;
		int cnt = 0;
		int k = x;
		while (k) {
			cnt++;
			k /= 10;
		}
		int z = x / pow(10, cnt - 1);
		z = x - z * pow(10, cnt - 1);
		if (z == i) {
			cout << i << endl;
		}
	}
	return 0;
}